<?php

class Bet_Model_GroupMapper extends Bet_Model_Mapper {

	public function __construct() {
		$this->setDbTableName("Bet_Model_DbTable_Group");
		$this->setId('group_id');
	}

	/**
	 * Save or update an model object of a db instance
	 * @var Bet_Model_Group $group
	 * @return boolean Saving result - TRUE if successed, otherwise FALSE
	 */
	public function save(Bet_Model_Group $group) {
		$data = array(
			"group_id" => $group->getGroupId(),
			"name" => $group->getName(),
			"description" => $group->getDescription(),
			"status" => $group->getStatus()
		);
		return parent::save($data);
	}

}

